{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "51a8f49e-2b0b-4215-8563-f5677f662071",
   "metadata": {},
   "source": [
    "# 安装配置环境\n",
    "\n",
    "同济子豪兄 2024-8-31"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "a4a1e093-b665-49d2-abbf-bb76464bf1da",
   "metadata": {},
   "source": [
    "## 环境说明\n",
    "\n",
    "Python 3.10.14\n",
    "\n",
    "Windows 10"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "4ab78378-7ef8-4bc7-8933-fde610987a45",
   "metadata": {},
   "source": [
    "## 参考资料\n",
    "\n",
    "感谢卢建晖老师的代码教程：https://github.com/kinfey/Intel-Phi-3-workshop"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "9f3d5c18-286c-4821-aea2-e6ff4256055e",
   "metadata": {},
   "source": [
    "## 安装依赖工具包"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "8a8e4215-0bc6-4e8f-8e55-cb32124cd239",
   "metadata": {},
   "outputs": [],
   "source": [
    "!pip install openvino accelerate pip ffmpeg --upgrade"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "34c5c213-f92b-4992-ba17-6db726ad59e9",
   "metadata": {},
   "outputs": [],
   "source": [
    "!pip install -r requirements.txt"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "a4c37088-9697-4fbe-aa7b-d6d2d8ed8399",
   "metadata": {},
   "source": [
    "## 用OpenVINO转换成INT4的模型放至`model`目录下\n",
    "\n",
    "模型来源：huggingface.co/lokinfey"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "7a8b8ffd-b13b-4954-bff6-016b90e2527d",
   "metadata": {},
   "source": [
    "## dll文件处理\n",
    "\n",
    "将\n",
    "\n",
    "`libomp140.x86_64.dll`文件\n",
    "\n",
    "复制粘贴至\n",
    "\n",
    "`C:\\\\Users\\\\用户名\\\\AppData\\\\Local\\\\Programs\\\\Python\\\\Python310\\\\Lib\\\\site-packages\\\\torch\\\\lib`\n",
    "\n",
    "类似这样的目录下"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "0c09bd18-5293-46c7-af99-38f00f28e9fe",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.14"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
